Skip to content

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Oct 27, 2025

This PR serves to implement SearchQuotientCluster.split() in full, meeting the following criteria:

  1. If two or more paths result in an identical left-hand split result, that result should be deduplicated to a single instance.
    - This requires (live) use of the .isSameNode() method from feat(web): add isSameNode for duplicate quotient-node detection 🚂 #15478, which is designed to identify such cases. It thus is no longer unit-test only.
  2. The results must meet the criteria for 'convergence' as described in change(web): track right-hand split index for input source of tokenized transforms 🚂 #15104 - even if that means returning multiple possible split tuples.
    - We must not group left-hand side paths (or right-hand side paths) that represent different subsets of the user's original keystrokes.
  3. The SearchQuotientCluster type should be leveraged for results where applicable - where two or more paths converge to the same total subset of keystroke input + codepoint length.

Build-bot: skip build:web
Test-bot: skip

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Oct 27, 2025

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot bot changed the title feat(web): implement SearchCluster splitting and merging feat(web): implement SearchCluster splitting and merging 🚂 Oct 27, 2025
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S15 milestone Oct 27, 2025
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 72798ba to e5083de Compare October 27, 2025 20:31
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 8adec0a to fe15157 Compare October 27, 2025 20:32
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 4e17f64 to 8df54e8 Compare November 5, 2025 17:13
@jahorton jahorton changed the base branch from refactor/web/complex-search-space-reuse to change/web/track-righthand-split-index November 5, 2025 17:13
@keyman-server keyman-server modified the milestones: A19S15, A19S16 Nov 8, 2025
@jahorton jahorton force-pushed the change/web/track-righthand-split-index branch from e65ad7c to 5f1ce79 Compare November 10, 2025 21:12
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 2989607 to 7e82b72 Compare November 10, 2025 21:21
@jahorton jahorton changed the base branch from change/web/track-righthand-split-index to refactor/web/complex-search-space-reuse November 10, 2025 21:22
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from ef700d0 to 567ba68 Compare November 10, 2025 22:22
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 7e82b72 to 6bbdb8d Compare November 10, 2025 22:23
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 567ba68 to 0286e3c Compare November 11, 2025 23:15
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 6bbdb8d to 39ac356 Compare November 11, 2025 23:33
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 18c246a to d98603f Compare November 12, 2025 19:52
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 0eddcf8 to dadefba Compare November 12, 2025 19:53
@keyman-server keyman-server modified the milestones: A19S16, A19S17 Nov 22, 2025
@keyman-server keyman-server modified the milestones: A19S17, A19S18 Dec 6, 2025
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from eaac92f to 403721b Compare January 20, 2026 21:47
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from dadefba to ec12918 Compare January 21, 2026 16:39
@jahorton jahorton changed the base branch from refactor/web/complex-search-space-reuse to change/web/add-same-edge-detection January 21, 2026 16:39
@jahorton jahorton force-pushed the change/web/add-same-edge-detection branch 2 times, most recently from bb2c119 to e69bb62 Compare January 28, 2026 19:22
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from ec12918 to 345c949 Compare January 28, 2026 21:29
@jahorton jahorton force-pushed the change/web/add-same-edge-detection branch from e69bb62 to 71df397 Compare January 28, 2026 21:36
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 345c949 to e3ce01f Compare January 28, 2026 21:37
@jahorton jahorton force-pushed the change/web/add-same-edge-detection branch from 71df397 to 1f4897f Compare January 29, 2026 17:59
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from e3ce01f to d097728 Compare January 29, 2026 18:27
@jahorton jahorton force-pushed the change/web/add-same-edge-detection branch from 1f4897f to 56d7a8f Compare January 29, 2026 18:58
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from d097728 to c31523a Compare January 29, 2026 19:06
@jahorton jahorton changed the base branch from change/web/add-same-edge-detection to feat/web/cluster-merging January 29, 2026 19:06
@jahorton jahorton changed the title feat(web): implement SearchCluster splitting and merging 🚂 feat(web): implement SearchCluster splitting 🚂 Jan 29, 2026
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from c31523a to 8f7363d Compare January 29, 2026 20:17
@jahorton jahorton changed the base branch from feat/web/cluster-merging to change/web/prepare-for-divergent-splits January 29, 2026 20:19
@keyman-server keyman-server modified the milestones: A19S21, A19S22 Jan 31, 2026
Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the change/web/prepare-for-divergent-splits branch from fccd35e to 4f1435c Compare February 5, 2026 16:54
@jahorton jahorton force-pushed the feat/web/cluster-splitting-and-merging branch from 8f7363d to 98d2043 Compare February 5, 2026 16:57
@jahorton jahorton requested review from ermshiperete and mcdurdin and removed request for ermshiperete February 5, 2026 16:58
@jahorton jahorton marked this pull request as ready for review February 5, 2026 16:58
// in its history, but it reconverges before the end.
assert.isTrue(cleanSplit[1] instanceof SearchQuotientSpur);
// Note that the path structures themselves, however, will be rebuilt -
// and with new spaceIDs.ß
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// and with new spaceIDs.ß
// and with new spaceIDs.

const cleanTail = seq.slice(splitIndex+1);

const splitSegment = seq[splitIndex];
const segmentSplitIndex = splitSegment.codepointLength - splitLocation;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? search-quotient-spur.ts uses

const internalSplitIndex = charIndex - (this.codepointLength - this.insertLength);

so I'm wondering if this should be ?

Suggested change
const segmentSplitIndex = splitSegment.codepointLength - splitLocation;
const segmentSplitIndex = splitLocation - (splitSegment.codepointLength - splitSegment.insertLength);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants